package cn.niit.letuseatdemo.service.impl;

import cn.niit.letuseatdemo.entity.domain.SysDictType;
import cn.niit.letuseatdemo.mapper.SysDictTypeMapper;
import cn.niit.letuseatdemo.service.SysDictTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
  * @Description: 字典类型Service业务层处理
  * @Author: su_fuming
  * @CreateTime: 2022/11/29 14:16
 * @param: null
 * @return: null
  **/
@Service
public class SysDictTypeServiceImpl implements SysDictTypeService
{
    @Autowired
    private SysDictTypeMapper sysDictTypeMapper;

    /**
     * 查询字典类型
     * 
     * @param dictId 字典类型主键
     * @return 字典类型
     */
    @Override
    public SysDictType selectSysDictTypeByDictId(Long dictId)
    {
        return sysDictTypeMapper.selectSysDictTypeByDictId(dictId);
    }

    /**
     * 查询字典类型列表
     * 
     * @param sysDictType 字典类型
     * @return 字典类型
     */
    @Override
    public List<SysDictType> selectSysDictTypeList(SysDictType sysDictType)
    {
        return sysDictTypeMapper.selectSysDictTypeList(sysDictType);
    }

    /**
     * 新增字典类型
     * 
     * @param sysDictType 字典类型
     * @return 结果
     */
    @Override
    public int insertSysDictType(SysDictType sysDictType)
    {
        return sysDictTypeMapper.insertSysDictType(sysDictType);
    }

    /**
     * 修改字典类型
     * 
     * @param sysDictType 字典类型
     * @return 结果
     */
    @Override
    public int updateSysDictType(SysDictType sysDictType)
    {
        return sysDictTypeMapper.updateSysDictType(sysDictType);
    }

    /**
     * 删除字典类型信息
     * 
     * @param dictId 字典类型主键
     * @return 结果
     */
    @Override
    public int deleteSysDictTypeByDictId(Long dictId)
    {
        return sysDictTypeMapper.deleteSysDictTypeByDictId(dictId);
    }
}